<%@page contentType="text/html" pageEncoding="UTF-8"%>
<%@page import="controller.*"%> 
<%@page import="persistence.*"%>
<%
        if (session.getAttribute("conex")==null){
        AccesoBD baseDatos =new AccesoBD();
        /*la guarda para obtenerla cuando lo necesita*/
        session.setAttribute("conex", baseDatos);
        }
        
        String visibility=(String)session.getAttribute("div");
        if(session.getAttribute("div")== null){
            visibility="hidden";
            
        }
        String username,subMenu;
        if(session.getAttribute("username")==null){
           username="Usuario";
           subMenu="Login.jsp";
        }else{
            username= (String)session.getAttribute("username");
            subMenu="salir.jsp";
        }

        GenerarHTMLLogin html=new GenerarHTMLLogin();
        out.print(html.generarHTMLHead("Login"));
        out.print(html.generarHTMLMenu(username,subMenu));
        out.print(html.generarHTMLMain_content(request,visibility));
        out.print(html.generarHTMLFooterCont());
        out.print(html.generarHTMLFinal());
   
%>